package com.baidu.controller;

import com.baidu.pojo.TbSeller;
import com.baidu.service.TbSellerService;
import com.baidu.utils.ResultResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author 满天星斗
 * @version 1.0
 * @description: TODO
 * @date 2021/8/23 9:20
 */
@RestController
@CrossOrigin(origins = "*",allowedHeaders = "*")
public class TbSellerController {


    @Autowired
    private TbSellerService sellerService;


    @PostMapping("/sellerLogin/{userName}/{password}")
    public ResultResponse sellerLogin(@PathVariable String userName ,@PathVariable String passWord){
        return  sellerService.sellerLogin(userName,passWord);
    }

    @PostMapping("/getSellerBySellerId/{sellerId}")
    public ResultResponse getSellerBySellerId(@PathVariable("sellerId") String sellerId){
        return sellerService.getSellerBySellerId(sellerId);
    }

    @PostMapping("/updSeller")
    public ResultResponse updSeller(@RequestBody TbSeller seller){
        return sellerService.updSeller(seller);
    }








}
